<!doctype html>
<html>
<head>
  <meta charset="utf-8">
	<title>私有云网盘</title>
	<meta name="viewport" content="width=device-width,user-scalable=no"/>
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
	<meta name="keywords" content="私有云网盘"/>
	<meta name="description" content="世界上最好的私有云网盘"/>
	<meta name="author" content="小柒2012" />
	<meta name="site" content="https://blog.52itstyle.vip" />
	<link rel="stylesheet" th:href="@{/iview/styles/iview.css}">
    <link rel="icon" type="image/png" th:href="@{assets/i/favicon.png}">
    <link rel="apple-touch-icon-precomposed" href="@{assets/i/app-icon72x72@2x.png}">
    <link rel="stylesheet" th:href="@{assets/css/amazeui.min.css}" />
    <link rel="stylesheet" th:href="@{assets/css/admin.css}">
    <link rel="stylesheet" th:href="@{assets/css/app.css}">



</head>
<body data-type="login">
  <div class="am-g myapp-login" v-cloak id="app">
	<div class="myapp-login-logo-block  tpl-login-max">
		<div class="myapp-login-logo-text">
			<div class="myapp-login-logo-text">

				柒云<span> Login</span> <i class="am-icon-skyatlas"></i>
			</div>
		</div>
		<div class="login-font">
			<i>Log In </i> or <span> Sign Up</span>
		</div>
		<div class="am-u-sm-10 login-am-center">
			<form class="am-form">
				<fieldset>
					<div class="am-form-group">
						<input type="text"  v-model="username"   id="doc-ipt-email-1" placeholder="输入账号">
					</div>
					<div class="am-form-group">
						<input type="password"   v-model="password"   id="doc-ipt-pwd-1" placeholder="设置个密码吧">
					</div>
					<p><button type="button"  @click="login" class="am-btn am-btn-default">登录</button></p>
					<div align="center">
						<img  src="https://blog.52itstyle.vip/usr/uploads/2017/07/1801066129.jpg"/>
					</div>
				</fieldset>
			</form>

		</div>
	</div>
</div>
  <script th:src="@{assets/js/jquery.min.js}"></script>
  <script th:src="@{assets/js/amazeui.min.js}"></script>
  <script th:src="@{assets/js/app.js}"></script>
  <script th:src="@{libs/vue.min.js}"></script>
  <script th:src="@{libs/vue.min.js}"></script>
  <script th:src="@{/iview/iview.min.js}" type="text/javascript"></script>
  <script>
	$(function () {
		var vm = new Vue({
			el: '#app',
			data:{
				username: 'admin',
				password: 'admin',
			},
			methods: {
				login: function (event) {
					if(vm.username==""){
						this.$Message.warning("请输入用户名");
						return false;
					}else if(vm.password==""){
						this.$Message.warning("请输入密码");
						return false;
					}
					var self = this;
					var data = "username="+vm.username+"&password="+vm.password;
					$.ajax({
						type: "POST",
					    url: "user/login",
					    data: data,
					    dataType: "json",
					    success: function(result){
							if(result.code == 0){//登录成功
								parent.location.href ='index.shtml';
							}else{
								self.$Notice.warning({
									title: '友情提醒',
									desc: '为了防止恶意上传，请扫描二维码关注公众号回复私有网盘获取账号密码'
								});
							}
						}
					});
				},
			},
			created: function(){

			}
		});
	});
</script>
</body>
</html>